/*
 * Created by JFormDesigner on Fri Dec 20 10:40:18 CST 2024
 */

package com.hafu.view;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

import com.hafu.view.GYS.AddGYSFrm;
import com.hafu.view.GYS.ManageGYSFrm;
import com.hafu.view.RuKu.AddRuKuFrm;
import com.hafu.view.ShangPin.AddShangPinFrm;
import com.hafu.view.ShangPin.ManageShangPinFrm;
import com.hafu.view.kehu.AddKeHuFrm;
import com.hafu.view.kehu.ManageKeHuFrm;
import net.miginfocom.swing.*;

/**
 * @author aa
 */
public class MainFrm extends JFrame {
    public MainFrm() {
        initComponents();
    }

    private void button1(ActionEvent e) {
        // TODO add your code here
        KunCunFrm kunCunFrm = new KunCunFrm();
        kunCunFrm.setVisible(true);
    }

    private void button2(ActionEvent e) {
        // TODO add your code here
        AddGYSFrm addGYSFrm = new AddGYSFrm();
        addGYSFrm.setVisible(true);
    }

    private void button3(ActionEvent e) {
        // TODO add your code here
        ManageGYSFrm manageGYSFrm = new ManageGYSFrm();
        manageGYSFrm.setVisible(true);
    }

    private void button4(ActionEvent e) {
        // TODO add your code here
        AddKeHuFrm addKeHuFrm = new AddKeHuFrm();
        addKeHuFrm.setVisible(true);
    }

    private void button5(ActionEvent e) {
        // TODO add your code here
        ManageKeHuFrm manageKeHuFrm = new ManageKeHuFrm();
        manageKeHuFrm.setVisible(true);
    }

    private void button6(ActionEvent e) {
        // TODO add your code here
        AddShangPinFrm addShangPinFrm = new AddShangPinFrm();
        addShangPinFrm.setVisible(true);

    }

    private void button7(ActionEvent e) {
        // TODO add your code here
        ManageShangPinFrm manageShangPinFrm = new ManageShangPinFrm();
        manageShangPinFrm.setVisible(true);
    }

    private void button8(ActionEvent e) {
        // TODO add your code here
        AddRuKuFrm addRuKuFrm = new AddRuKuFrm();
        addRuKuFrm.setVisible(true);
    }

    private void button9(ActionEvent e) {
        // TODO add your code here
        AddRuKuFrm addRuKuFrm = new AddRuKuFrm();
        addRuKuFrm.setVisible(true);
    }



    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
        button1 = new JButton();
        button2 = new JButton();
        button3 = new JButton();
        button4 = new JButton();
        button5 = new JButton();
        button6 = new JButton();
        button7 = new JButton();
        button9 = new JButton();

        //======== this ========
        setTitle("\u4e3b\u754c\u9762");
        Container contentPane = getContentPane();
        contentPane.setLayout(new MigLayout(
            "hidemode 3",
            // columns
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]",
            // rows
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]"));

        //---- button1 ----
        button1.setText("\u67e5\u770b\u5e93\u5b58");
        button1.addActionListener(e -> button1(e));
        contentPane.add(button1, "cell 2 2");

        //---- button2 ----
        button2.setText("\u6dfb\u52a0\u4f9b\u5e94\u5546");
        button2.addActionListener(e -> button2(e));
        contentPane.add(button2, "cell 2 4");

        //---- button3 ----
        button3.setText("\u4f9b\u5e94\u5546\u7ba1\u7406");
        button3.addActionListener(e -> button3(e));
        contentPane.add(button3, "cell 5 4");

        //---- button4 ----
        button4.setText("\u6dfb\u52a0\u5ba2\u6237");
        button4.addActionListener(e -> button4(e));
        contentPane.add(button4, "cell 2 6");

        //---- button5 ----
        button5.setText("\u5ba2\u6237\u7ba1\u7406");
        button5.addActionListener(e -> button5(e));
        contentPane.add(button5, "cell 5 6");

        //---- button6 ----
        button6.setText("\u6dfb\u52a0\u5546\u54c1");
        button6.addActionListener(e -> {
			button6(e);
			button6(e);
		});
        contentPane.add(button6, "cell 2 8");

        //---- button7 ----
        button7.setText("\u5546\u54c1\u7ba1\u7406");
        button7.addActionListener(e -> {
			button7(e);
			button7(e);
		});
        contentPane.add(button7, "cell 5 8");

        //---- button9 ----
        button9.setText("\u6dfb\u52a0\u5165\u5e93");
        button9.addActionListener(e -> button9(e));
        contentPane.add(button9, "cell 2 10");
        pack();
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables
    private JButton button1;
    private JButton button2;
    private JButton button3;
    private JButton button4;
    private JButton button5;
    private JButton button6;
    private JButton button7;
    private JButton button9;
    // JFormDesigner - End of variables declaration  //GEN-END:variables
}
